package com.bluenave.crm.core.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: aleksanderbrancewicz
 * Date: 7/26/11
 * Time: 6:32 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
@DiscriminatorValue("2")
public class CompanyContact extends Contact implements Serializable{

    private Company company = null;

    public CompanyContact() {
       super();
    }

    public CompanyContact(Company company, String email,boolean active, String phoneNumber){
        super(email,active,phoneNumber);
        this.company = company;
    }

    @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }
}
